package com.yksj.healthtalk.comm;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.yksj.healthtalk.entity.DoctorPatientListEntity;
import com.yksj.healthtalk.ui.R;

public class DoctorPatientList extends BaseAdapter {
	private List<DoctorPatientListEntity> list = new ArrayList<DoctorPatientListEntity>();;
	private LayoutInflater from;
	private Context context;

	public DoctorPatientList(Context context) {
		from = LayoutInflater.from(context);
		this.context = context;
		for (int i = 0; i < 10; i++) {
			list.add(new DoctorPatientListEntity());
		}
	}

	public void onchang(List<DoctorPatientListEntity> mEntities) {
		notifyDataSetChanged();
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView == null || convertView.getTag() == null) {
			convertView = from.inflate(R.layout.doctor_patient_item, null);
//			convertView.findViewById(R.id.onclick).setOnClickListener(this);
		}

		return convertView;
	}

}
